package com.example.mountainwalker.service.impl;

import com.example.mountainwalker.entity.StrategyFavoriteInfo;
import com.example.mountainwalker.mapper.StrategyFavoriteMapper;
import com.example.mountainwalker.service.StrategyFavoriteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class StrategyFavoriteServiceImpl implements StrategyFavoriteService {
    @Autowired
    private StrategyFavoriteMapper strategyFavoriteMapper;

    @Override
    public List<StrategyFavoriteInfo> getStrategyFavoriteInfo() {
        List<StrategyFavoriteInfo> strategyFavoriteInfoList = strategyFavoriteMapper.getStrategyFavoriteInfo();
        return strategyFavoriteInfoList;
    }

    @Override
    public StrategyFavoriteInfo getStrategyFavoriteInfoById(Integer StrategyFavoriteID) {
        StrategyFavoriteInfo info = strategyFavoriteMapper.getStrategyFavoriteInfoById(StrategyFavoriteID);
        return info;
    }

    @Override
    public int deleteStrategyFavoriteInfoById(Integer StrategyFavoriteID) {
        int i = strategyFavoriteMapper.deleteStrategyFavoriteInfoById(StrategyFavoriteID);
        return i;
    }

    @Override
    public int insertStrategyFavoriteInfo(StrategyFavoriteInfo strategyFavoriteInfo) {
        int i = strategyFavoriteMapper.insertStrategyFavoriteInfo(strategyFavoriteInfo);
        return i;
    }

    @Override public int updateStrategyFavoriteInfo(StrategyFavoriteInfo strategyFavoriteInfo) {
        int i = strategyFavoriteMapper.updateStrategyFavoriteInfo(strategyFavoriteInfo);
        return i;
    }

}
